<%@ page import="ro.gateway.aida.utils.HttpUtils,
                 ro.xblue.translator.LanguageBean,
                 ro.xblue.translator.TranslatorUtils,
                 ro.gateway.aida.obj.db.ActivityDB,
                 ro.gateway.aida.srv.ICFService,
                 ro.gateway.aida.servlet.Constants,
                 java.util.Hashtable,
                 ro.gateway.aida.servlet.EditActivityServlet,
                 ro.xblue.translator.Translator,
                 ro.xblue.translator.TranslatorConstants,
                 java.text.SimpleDateFormat,
                 java.util.Date,
                 ro.gateway.aida.obj.*,
                 ro.gateway.aida.fnd.FundingItem,
                 ro.gateway.aida.usr.User,
					 ro.gateway.aida.usr.UserUtils,
				   ro.xblue.translator.*
                 ,
                 ro.gateway.aida.db.PersistenceManager,
                 ro.gateway.aida.admin.ActivityObjectsOptions,
                 ro.gateway.aida.admin.ActObjsOptsConst,
			  java.util.ArrayList,
			  ro.gateway.aida.admin.PropertyListItem"%>
<%@ taglib uri="/WEB-INF/translator.tld" prefix="trans" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%> 


<%
     // parameters
     long id = HttpUtils.getLong(request, "id", -1);
     if (id == -1) {
          Long l = ((Long)request.getAttribute("project_id"));
          id = (l != null) ? l.longValue() : -1;
     }
     boolean show_close_button = request.getAttribute("pview_hideclose") == null;

     LanguageBean lang_bean = TranslatorUtils.getCurrentLanguage(request, application);
     //
     Activity bean = null;
     Hashtable services = ( Hashtable ) application.getAttribute( Constants.SERVICES );
     ICFService cfService = ( ICFService ) services.get( Constants.SERVICE_CF );
     long time = 0;
     if (id != -1) {
          time = System.currentTimeMillis();
          bean = ActivityDB.getManager(PersistenceManager.tokenLookup(application)).
                getAllDataById(id);
		bean.setView_lang(lang_bean.language);
          time = System.currentTimeMillis() - time;
     }
     if (bean == null) {
          Hashtable ed_ctx = (Hashtable) request.getAttribute(EditActivityServlet.PNAME_R_CTX);
          if (ed_ctx != null) {
               bean = (Activity) ed_ctx.get(EditActivityServlet.PNAME_BEAN);
          }
     }

     // misc
     String ctx = request.getContextPath();
     Translator translator = (Translator) application.
           getAttribute(TranslatorConstants.BLUE_TRANSLATOR);

   Translator_DB translator_db = (Translator_DB) application.
            getAttribute(TranslatorConstants.DB_TRANSLATOR);

 String unspecified = null;
 if (translator != null) {
            unspecified = translator.
                  getMessage(lang_bean.language, "prj_pages", "p7.unsp");
      } else if (translator_db != null) {
            unspecified = translator_db.
                  getMessage(lang_bean.language, "prj_pages", "p7.unsp");
      }
      if (unspecified == null) unspecified = "p7.unsp";

     User user = UserUtils.getLogged(request,response);
     
String user_id=request.getParameter("user_id");
String event_id=request.getParameter("event_id");
%>
<trans:initPage module="prj_pages" />
<style>
A:hover {

	TEXT-DECORATION: underline

}

.text_search { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 

8pt; font-style: normal} 
.text_search1 { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 8pt; font-style: normal; text-decoration: none; color: #000000}

.text { font-family: Verdana, 
Arial, Helvetica, sans-serif; font-size: 9pt; font-style: normal; font-weight: 

normal; text-decoration: none} 

.titlu { font-family: Verdana, Arial, Helvetica, 

sans-serif; font-size: 11pt; font-style: normal; font-weight: bold; text-decoration: 

none} 

.text_bold { font-family: Verdana, 

Arial, Helvetica, sans-serif; font-size: 9pt; font-style: normal; font-weight: 

bold; text-decoration: none}

.text_searchbold { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 8pt; font-style: normal ; font-weight: bold; text-decoration: none; color: #333333;}

select {  font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; color: #000000; text-decoration: none; background-color: #FFFFFF; border: ridge; border-color: #999999 #999999 e0e0e0 e0e0e0; border-width: 1pt 1pt 1px 1px}

textarea {  font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; color: #333333; text-decoration: none; background-color: #FFFFFF; border: #999999; border-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px}

.buton {  font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; font-weight: bold; color: #000000; text-decoration: none; background-color: #ECF3FD; border-color: #FFFFFF #003399 #003399 #FFFFFF; border-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px}

.textalb { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 8pt; font-style: normal ; font-weight: bold ; color: #FFFFFF; text-decoration: none}

.textalbhelp { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 8pt; font-style: normal ; font-weight: normal ; color: #FFFFFF; text-decoration: none}

.butonsave { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; font-weight: bold; color: #FFFFFF; text-decoration: none; background-color: #0099CC; border-color: #99CCFF #000033 #000033 #99CCFF; padding-top: 2px; padding-right: 2px; padding-bottom: 2px; padding-left: 2px; border-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px}

.butonpublish { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; font-weight: bold; color: #FFFFFF; text-decoration: none; background-color: #990033; border-color: #FF6666 #660000 #660000 #FF6666; padding-top: 2px; padding-right: 3px; padding-bottom: 2px; padding-left: 3px ; border-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px}

.lngtdblack { font-family: Verdana, 

Arial, Helvetica, sans-serif; font-size: 8pt; color: #000000; font-style: normal; font-weight: 

bold; text-decoration: none}

.lngtdwhite { font-family: Verdana, 

Arial, Helvetica, sans-serif; font-size: 8pt; color: #FFFFFF; font-style: normal; font-weight: 

bold; text-decoration: none}

.lngsel { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 8pt; color: #FFFFFF; font-style: normal;

normal; text-decoration: none}

.inputt {BACKGROUND-COLOR: #ffffff; BORDER-BOTTOM: #cacaca 1px solid; BORDER-LEFT: #cacaca 1px solid; BORDER-RIGHT: #cacaca 1px solid; BORDER-TOP: #cacaca 1px solid; FONT: 11px Verdana, Arial, san-serif}

.header-nav {

	font-size: 10px;

	color: #FFFFFF;

	font-family: Verdana, Arial, Helvetica, sans-serif;

	text-decoration: none;

	font-weight: bold;

}
</style>

<TABLE cellSpacing=1 cellPadding=5 width="90%" bgColor=#0099cc align="center">


<%// there is no bean %>
<% if (bean == null) { %>
     <TR bgColor=#ffffff>
          <TD colspan="2" class=text_search>
               <trans:showPageMessage label="pview.no_project" />
          </TD>
     </TR>
</table>
</body>
</html>
<% return; } %>
<%// there is no bean %>

      <% if (bean.getTitle(lang_bean.language) != null) { %>
            <TR bgColor=#336699>
                  <TD class=text_bold align=center colspan="2"><font color="#FFFF00">
                  <%=(bean.getTitle(lang_bean.language) != null) ? bean.getTitle(lang_bean.language) : "unspecified"%>
                  </font></TD>
            </TR>
      <% } %>

     <%// donor ids%>
     <%
          OrganizationInv[] donor_orgs = bean.getOrgsByLRId(OrganizationRole.DONOR_ORG_ROLE);
          if (donor_orgs == null) donor_orgs = new OrganizationInv[0];
     %>
     <% if (donor_orgs.length > 0) { %>
     <TR bgColor=#ffffff>
          <TD width="20%" class=text_searchbold valign="top">
               <trans:showPageMessage label="md.identif" /><br>
               <trans:showPageMessage label="p.iddproj" />
          </TD>
          <TD width="80%" class=text_search valign="top">
               <% for (int i = 0; i < donor_orgs.length; i++) { %>
                    <%
                    String donor_id = bean.getDonorIdForOrg(donor_orgs[i].getOrg().getId());
                    if (donor_id == null) donor_id = "";
                    %>
                    <trans:showPageMessage label="p.org" /> <%=donor_orgs[i].getOrg().getName().getString(lang_bean.language)%>: <%=donor_id%>
                    <br>
               <% } %>
               <% if (donor_orgs.length == 0) { %>
                    <%=unspecified%>
               <% } %>
          </TD>
     </TR>
     <% } %>

     <%// planning %>
     <%
          SimpleDateFormat date_formatter = new SimpleDateFormat("dd/MM/yyyy");
     %>
     <TR bgColor=#ffffff>
          <TD width="20%" class=text_searchbold valign="top">
               
               <trans:showPageMessage label="p.plan" />
          </TD>
          <TD width="80%" class=text_search valign="top">
               <trans:showPageMessage label="p.dprop" />:
               <%=(bean.getDate_pa() != -1) ? date_formatter.format(new java.util.Date(bean.getDate_pa())) : unspecified%>
               <br>
               <trans:showPageMessage label="p.dapp" />:
               <%=(bean.getDate_aa() != -1) ? date_formatter.format(new java.util.Date(bean.getDate_aa())) : unspecified%>
               <hr size="1">

               <trans:showPageMessage label="p.pstart" />:
               <%=(bean.getDate_ps() != -1) ? date_formatter.format(new java.util.Date(bean.getDate_ps())) : unspecified%>
               <br>
               <trans:showPageMessage label="p.sdate" />:
               <%=(bean.getDate_as() != -1) ? date_formatter.format(new java.util.Date(bean.getDate_as())) : unspecified%>
               <hr size="1">

               <trans:showPageMessage label="p.endpdate" />:
               <%=(bean.getDate_pe() != -1) ? date_formatter.format(new java.util.Date(bean.getDate_pe())) : unspecified%>
               <br>
               <trans:showPageMessage label="p.enddate" />:
               <%=(bean.getDate_ae() != -1) ? date_formatter.format(new java.util.Date(bean.getDate_ae())) : unspecified%>
               <hr size="1">

               <p>
               <% if (bean.getDate_ext() != -1) { %>
                    <trans:showPageMessage label="p.projext" />:
                         <%=date_formatter.format(new Date(bean.getDate_ext()))%>
                    <hr size="1">
               <% } else { %>
                  <trans:showPageMessage label="p.projwasntextended" /><br/>
               <% } %>
              <% if (bean.getExtensionReason(lang_bean.language) != null) { %>
                   <trans:showPageMessage label="p.reason" />:<br>
                   <%=bean.getExtensionReason(lang_bean.language)%>
              <% } %>
              </p>


               <%
                     ActivityStatus act_status = bean.getStatus();
               %>
               <% if (act_status != null) { %>
               <p>
              <trans:showPageMessage label="p.status" /> : <%=act_status.getStatus(lang_bean.language)%>
              <% if (bean.getStatusReason(lang_bean.language) != null) { %>
              <br><%=bean.getStatusReason(lang_bean.language)%>
              <% } %>
              </p>
              <% } %>
          </TD>
     </TR>

     <%// location %>
     <%
          AIDALocation[] locations = bean.getLocations();
          if (locations == null) locations = new AIDALocation[0];
     %>
     <% if (locations.length > 0) { %>
     <TR bgColor=#ffffff>
          <TD width="20%" class=text_searchbold valign="top">
              
               <trans:showPageMessage label="p2.titlu" />
          </TD>
          <TD width="80%" class=text_search valign="top">
               <trans:showPageMessage label="p2.is" />:
               <% if (bean.isInternational()) { %>
                    <trans:showPageMessage label="p2.international" />
               <% } else { %>
                    <trans:showPageMessage label="p2.national" />
               <% } %><br>
               <trans:showPageMessage label="p2.transfrontalier" />:
               <% if (bean.isTransfrontalier()) { %>
                    <trans:showPageMessage label="proj.da" />
               <% } else { %>
                    <trans:showPageMessage label="proj.nu" />
               <% } %>

               <br><br>
               <trans:showPageMessage label="md.loclist" />:<br>
               <%=(locations.length > 0) ? "" : unspecified%>
			<% int last_region = -1; %>
			<% for (int i = 0; i < locations.length; i++) { %>
				<% if (last_region == -1 || locations[i].getCregion_id() != last_region) { %>
				   <b>[<%=locations[i].getCregion().getName()%>]</b><br/>
				<% } %>
				<% if (locations[i].getCountry() != null) { %>
				   &nbsp;&nbsp;&nbsp;&rarr;&nbsp; [<%=locations[i].getCountry().getName()%>]
				<% } %>
				<% if (locations[i].getRegion() != null) { %>
				- <%=locations[i].getRegion().getName()%>
				<% } %>
				<% if (locations[i].getJudet() != null) { %>
				- <%=locations[i].getJudet().getName()%>
				<% } %>
				<% if (locations[i].getOras() != null) { %>
				- <%=locations[i].getOras().getName()%>
				<% } %>
				<% if (locations[i].getLocalitate() != null) { %>
				- <%=locations[i].getLocalitate().getName()%>
				<% } %>
				<br/>
			<% last_region = locations[i].getCregion_id(); %>
			<% } %>
          </TD>
     </TR>
     <% } %>

     <%// sectors  %>
     <%
          AIDAObjSector[] sectors = bean.getSectors();
          if (sectors == null) sectors = new AIDAObjSector[0];
     %>
     <% if (sectors.length > 0) { %>
     <TR bgColor=#ffffff>
          <TD width="20%" class=text_searchbold valign="top">
               
               <trans:showPageMessage label="p2.sector" />
          </TD>
          <TD width="80%" class=text_search valign="top">
               <trans:showPageMessage label="pview.seclist" />:<br>
               <%=(sectors.length > 0) ? "" : unspecified%>
               <% for (int i = 0; i < sectors.length; i++) { %>
                  &middot;&nbsp;<%=sectors[i].getSector().getTitle("EN")%>
                  <% if (sectors[i].getSubsector() != null) { %>
                  - <%=sectors[i].getSubsector().getTitle("EN")%>
                  <% } %>
                  <% if (sectors[i].getSubsector1() != null) { %>
                  - <%=sectors[i].getSubsector1().getTitle(lang_bean.language)%>
                  <% } %>
                  <br>
               <% } %>
          </TD>
     </TR>
     <% } %>

     <% Category[] cats = bean.getCategoriesArray(); %>
     <% if (cats != null && cats.length > 0) { %>
     <TR bgColor=#ffffff>
          <TD width="20%" class=text_searchbold valign="top">
               <img src=<%=ctx%>/images/arrow_blue.gif hspace=4>
               <trans:showPageMessage label="p2.cats" />
          </TD>
          <TD width="80%" class=text_search valign="top">
            <% for (int i = 0; i < cats.length; i++) { %>
                  &middot;&nbsp;&nbsp;<%=cats[i].getName().getString(lang_bean.language)%>
                  <br>
            <% } %>
          </TD>
     </TR>
     <% } %>

     <%// components  %>
     <%
          GenericActivityProperty[] components = bean.getComponents();
          if (components == null) components = new GenericActivityProperty[0];
     %>
     <% if (components.length > 0) { %>
     <TR bgColor=#ffffff>
          <TD width="20%" class=text_searchbold valign="top">
               
               <trans:showPageMessage label="md.comp" />
          </TD>
          <TD width="80%" class=text_search valign="top">
               <trans:showPageMessage label="pview.complist" />:<br>
               <%=(components.length > 0) ? "" : unspecified%>
               <% for (int i = 0; i < components.length; i++) { %>
                    &middot;&nbsp;<%=components[i].getName(lang_bean.language)%>
                    <br>
               <% } %>
          </TD>
     </TR>
     <% } %>

     <%// components  %>
     <%
          OrganizationInv[] forgs = bean.
                 getOrgsByLRId(OrganizationRole.FINANCING_ORG_ROLE);
          PersonInv[] fpers = bean.
                 getPersonsByLRId(OrganizationRole.FINANCING_ORG_ROLE);
          FundingItem[] fitems = bean.getFunding_itemsArray();
          if (forgs == null) forgs = new OrganizationInv[0];
          if (fpers == null) fpers = new PersonInv[0];
          if (fitems == null) fitems = new FundingItem[0];
     %>
     <% if (forgs.length > 0) { %>
     <TR bgColor=#ffffff>
          <TD width="20%" class=text_searchbold valign="top">
               <img src=<%=ctx%>/images/arrow_blue.gif hspace=4>
               <b><trans:showPageMessage label="pview.ftitle" /></b>
          </TD>
          <TD width="80%" class=text_search valign="top">
            <%request.setAttribute("__activity", bean);%>
            <jsp:include page="/fnd2/fnd_orgs_disp.jsp" />
		  <u><trans:showPageMessage label="total.budget" /></u>:<br/>
		  <%=bean.getProjectBudgetAsString(lang_bean.locale, "<br/>")%>
          </TD>
     </TR>
     <% } %>

     <%// relations  %>
     <%
          ActivityRelation[] relations = bean.getAct_relationsArray();
          if (relations == null) relations = new ActivityRelation[0];
     %>
     <% if (relations.length > 0) { %>
     <TR bgColor=#ffffff>
          <TD width="20%" class=text_searchbold valign="top">
               
               <trans:showPageMessage label="md.prel" />
          </TD>
          <TD width="80%" class=text_search valign="top">
               <trans:showPageMessage label="pview.complist" />:<br>
               <%=(relations.length > 0) ? "" : unspecified%>
               <% for (int i = 0; i < relations.length; i++) { %>
                    <%
                    GenericActivityProperty name = relations[i].getRelToTitle();
                    %>
                    &middot;&nbsp;<%=(name != null) ? name.getName(lang_bean.language) : "x"%> :
				<trans:showPageMessage label='<%=relations[i].getRelation()%>' />
                    <br>
               <% } %>
          </TD>
     </TR>
     <% } %>

     <%// contracting institutions  %>
     <%
          OrganizationInv[] corgs = bean.
                 getOrgsByLRId(OrganizationRole.CONTRACTING_ORG_ROLE);
          PersonInv[] cpers = bean.
                 getPersonsByLRId(OrganizationRole.CONTRACTING_ORG_ROLE);
          if (cpers == null) cpers = new PersonInv[0];
          if (corgs == null) corgs = new OrganizationInv[0];
     %>
     <% if (cpers.length + corgs.length > 0) { %>
     <TR bgColor=#ffffff>
          <TD width="20%" class=text_searchbold valign="top">
               
               <trans:showPageMessage label="md.cauth" />
          </TD>
          <TD width="80%" class=text_search valign="top">
            <% if (corgs.length > 0) { %>
               <trans:showPageMessage label="p7.orgs" />:<br>
               <%=(corgs.length > 0) ? "" : unspecified%>
               <% for (int i = 0; i < corgs.length; i++) { %>
                    &middot;&nbsp;<%=corgs[i].getOrg().getName().getString(lang_bean.language)%>
                    <br>
               <% } %>
               <br>
            <% } %>

            <% if (cpers.length > 0) { %>
               <trans:showPageMessage label="p7.pers" />:<br>
               <%=(cpers.length > 0) ? "" : unspecified%>
               <% for (int i = 0; i < cpers.length; i++) { %>
                    &middot;&nbsp;<%=cpers[i].getPerson().getName()%>
                    <br>
               <% } %>
               <br>
            <% } %>
          </TD>
     </TR>
     <% } %>

     <%// beneficiaries %>
     <%
          OrganizationInv[] borgs = bean.
                 getOrgsByLRId(OrganizationRole.BENEFICIARS_ORG_ROLE);
          PersonInv[] bpers = bean.
                 getPersonsByLRId(OrganizationRole.BENEFICIARS_ORG_ROLE);
          if (bpers == null) bpers = new PersonInv[0];
          if (borgs == null) borgs = new OrganizationInv[0];
     %>
     <% if (bpers.length + borgs.length>0) { %>
     <TR bgColor=#ffffff>
          <TD width="20%" class=text_searchbold valign="top">
               
               <trans:showPageMessage label="md.ben" />
          </TD>
          <TD width="80%" class=text_search valign="top">
            <% if (borgs.length > 0) { %>
               <trans:showPageMessage label="p7.orgs" />:<br>
               <%=(borgs.length > 0) ? "" : unspecified%>
               <% for (int i = 0; i < borgs.length; i++) { %>
                    &middot;&nbsp;<%=borgs[i].getOrg().getName().getString(lang_bean.language)%>
                    <br>
               <% } %>
               <br>
            <% } %>

            <% if (bpers.length > 0) { %>
               <trans:showPageMessage label="p7.pers" />:<br>
               <%=(bpers.length > 0) ? "" : unspecified%>
               <% for (int i = 0; i < bpers.length; i++) { %>
                    &middot;&nbsp;<%=bpers[i].getPerson().getName()%>
                    <br>
               <% } %>
               <br>
            <% } %>
          </TD>
     </TR>
     <% } %>

     <%// description and objectives %>
     <%
     %>
     <% if ((bean.getResult(lang_bean.language) != null) || ((bean.getDescription(lang_bean.language) != null) || (bean.getObjective(lang_bean.language) != null))) { %>
     <TR bgColor=#ffffff>
          <TD width="20%" class=text_searchbold valign="top">
               
               <trans:showPageMessage label="md.descobj" />
          </TD>
          <TD width="80%" class=text_search valign="top" align="center">
               <table width="90%" cellpadding="5" cellspacing="1" border="0" bgcolor="#AAAAAA">
               <% if (bean.getDescription(lang_bean.language) != null) { %>
                    <tr>
                         <td bgcolor="#FFFFFF" width="30%" class="text_search" align="right">
                         <trans:showPageMessage label="p5.descprj" /> :
                         </td>
                         <td bgcolor="#FFFFFF" width="70%" class="text_search">
                         <%=bean.getDescription(lang_bean.language) != null ? bean.getDescription(lang_bean.language) : unspecified%>
                         </td>
                    </tr>
               <% } %>
               <% if (bean.getObjective(lang_bean.language) != null) { %>
                    <tr>
                         <td bgcolor="#FFFFFF" width="30%" class="text_search" align="right">
                         <trans:showPageMessage label="p5.primobj" /> :
                         </td>
                         <td bgcolor="#FFFFFF" width="70%" class="text_search">
                         <%=bean.getObjective(lang_bean.language) != null ? bean.getObjective(lang_bean.language) : unspecified%>
                         </td>
                    </tr>
               <% } %>
               <% if (bean.getResult(lang_bean.language) != null) { %>
                    <tr>
                         <td bgcolor="#FFFFFF" width="30%" class="text_search" align="right">
                         <trans:showPageMessage label="p5.rezprj" /> :
                         </td>
                         <td bgcolor="#FFFFFF" width="70%" class="text_search">
                         <%=bean.getResult(lang_bean.language) != null ? bean.getResult(lang_bean.language) : unspecified%>
                         </td>
                    </tr>
               <% } %>
               </table>
          </TD>
     </TR>
     <% } %>

     <%// keywords %>
     <%
     %>
     <% if (bean.getKeywords(lang_bean.language) != null) { %>
     <TR bgColor=#ffffff>
          <TD width="20%" class=text_searchbold valign="top">
               
               <trans:showPageMessage label="md.keywords" />
          </TD>
          <TD width="80%" class=text_search valign="top">
          <%=bean.getKeywords(lang_bean.language) != null ? bean.getKeywords(lang_bean.language) : unspecified%>
          </TD>
     </TR>
     <% } %>

	<% ArrayList benz = bean.getBeneficiaries(); %>
     <% if ((benz != null && benz.size() > 0) || (bean.getBencomment(lang_bean.language) != null)) { %>
     <TR bgColor=#ffffff>
          <TD width="20%" class=text_searchbold valign="top">
               <img src=<%=ctx%>/images/arrow_blue.gif hspace=4>
               <b><trans:showPageMessage label="md.beneficiaries" /></b>
          </TD>
          <TD width="80%" class=text_search valign="top">
		<% for (int i = 0; (benz != null) && i < benz.size(); i++) { %>
			<%=((PropertyListItem)benz.get(i)).getString(lang_bean.language)%>
			<br/>
		<% } %>
		<% if (bean.getBencomment(lang_bean.language) != null) { %>
		<u><b>Comments:</b></u><br/>
		<%=bean.getBencomment(lang_bean.language)%>
		<% } %>
          </TD>
     </TR>
     <% } %>

     <%// data source institutions %>
     <%
          OrganizationInv[] ds_orgs = bean.
                 getOrgsByLRId(OrganizationRole.DATASOURCE_ORG_ROLE);
          if (ds_orgs == null) ds_orgs = new OrganizationInv[0];
     %>
     <% if (ds_orgs.length>0) { %>
     <TR bgColor=#ffffff>
          <TD width="20%" class=text_searchbold valign="top">
               <img src=<%=ctx%>/images/arrow_blue.gif hspace=4>
               <b><trans:showPageMessage label="p.sourceinst" /></b>
          </TD>
          <TD width="80%" class=text_search valign="top">
               <trans:showPageMessage label="p7.orgs" />:<br>
               <% for (int i = 0; i < ds_orgs.length; i++) { %>
                    &middot;&nbsp;<a href=# onclick="javascript:window.open('<%=ctx%>/org/view?id=<%=ds_orgs[i].getOrg().getId()%>', 'org_viewer', 'status=yes,WIDTH=400,HEIGHT=400,SCROLLBARS=yes');">
                    <%=ds_orgs[i].getOrg().getName().getString(lang_bean.language)%></a>
                    <br>
               <% } %>
               <br>
          </TD>
     </TR>
     <% } %>

     <%// Other person involved %>
     <%
          PersonInv[] opers = bean.
                 getPersonsByLRId(OrganizationRole.NO_ROLE);
          if (opers == null) opers = new PersonInv[0];
     %>
     <% if (opers.length > 0) { %>
     <TR bgColor=#ffffff>
          <TD width="20%" class=text_searchbold valign="top">
               
               <trans:showPageMessage label="p6.labelpers" />
          </TD>
          <TD width="80%" class=text_search valign="top">
               <%=(opers.length > 0) ? "" : unspecified%>
               <% for (int i = 0; i < opers.length; i++) { %>
                    &middot;&nbsp;<%=opers[i].getPerson().getName()%>
                    <br>
               <% } %>
          </TD>
     </TR>
     <% } %>

      <% ActivityObjectsOptions aoo = ActivityObjectsOptions.getInstance(); %>
      <% if (aoo.isEnabled(ActObjsOptsConst.PROJECT_CNAME)
            ||aoo.isEnabled(ActObjsOptsConst.PROJECT_CTITLE)
            ||aoo.isEnabled(ActObjsOptsConst.PROJECT_CEMAIL)
            ||aoo.isEnabled(ActObjsOptsConst.PROJECT_CCOUNTRY)
            ||aoo.isEnabled(ActObjsOptsConst.PROJECT_CADDR1)
            ||aoo.isEnabled(ActObjsOptsConst.PROJECT_CADDR2)
            ||aoo.isEnabled(ActObjsOptsConst.PROJECT_CPZIP)
            ||aoo.isEnabled(ActObjsOptsConst.PROJECT_CPHONE)
            ||aoo.isEnabled(ActObjsOptsConst.PROJECT_CURL)) { %>
      <% if (aoo.isEnabled(ActObjsOptsConst.PROJECT_CNAME)) { %>
      <TR bgColor=#ffffff>
            <TD width="20%" class=text_searchbold valign="center">
                  <b><trans:showPageMessage label="p6.labelcont" /></b>
            </TD>
            <TD width="80%" class=text_search valign="top">
                  <% ContactInfo cinfo = bean.getContact(); %>
                  <% if (aoo.isEnabled(ActObjsOptsConst.PROJECT_CNAME)) { %>
                  <trans:showPageMessage label="p.contactname" />: <%=cinfo.getcName() != null ? cinfo.getcName() : unspecified%>
                  <p>
                  <% } %>
                  <% if (aoo.isEnabled(ActObjsOptsConst.PROJECT_CTITLE)) { %>
                  <trans:showPageMessage label="p.contacttitle" />: <%=cinfo.getcTitle() != null ? cinfo.getcTitle() : unspecified%>
                  <p>
                  <% } %>
                  <% if (aoo.isEnabled(ActObjsOptsConst.PROJECT_CEMAIL)) { %>
                  <trans:showPageMessage label="p.ctemail" />:
                  <% if (cinfo.getcEmail() == null) { %>
                        <%=unspecified%>
                  <% } else { %>
                        <a href="mailto:<%=cinfo.getcEmail()%>"><%=cinfo.getcEmail()%></a>
                  <% } %>
                  <p>
                  <% } %>
                  <% if (aoo.isEnabled(ActObjsOptsConst.PROJECT_CADDR1)) { %>
                  <trans:showPageMessage label="p.address1" />: <%=cinfo.getAddr1() != null ? cinfo.getAddr1() : unspecified%>
                  <p>
                  <% } %>
                  <% if (aoo.isEnabled(ActObjsOptsConst.PROJECT_CADDR2)) { %>
                  <trans:showPageMessage label="p.address2" />: <%=cinfo.getAddr2() != null ? cinfo.getAddr2() : unspecified%>
                  <p>
                  <% } %>
                  <% if (aoo.isEnabled(ActObjsOptsConst.PROJECT_CPZIP)) { %>
                  <trans:showPageMessage label="p.zip" />: <%=cinfo.getPostalZip() != null ? cinfo.getPostalZip() : unspecified%>
                  <p>
                  <% } %>
                  <% if (aoo.isEnabled(ActObjsOptsConst.PROJECT_CCOUNTRY)) { %>
                  <trans:showPageMessage label="p.country" />: <%=cinfo.getCountry_iso3() != null ? cinfo.getCountry_iso3() : unspecified%>
                  <p>
                  <% } %>
                  <% if (aoo.isEnabled(ActObjsOptsConst.PROJECT_CPHONE)) { %>
                  <trans:showPageMessage label="p.phonefax" />: <%=cinfo.getcPhone() != null ? cinfo.getcPhone() : unspecified%>
                  <p>
                  <% } %>
                  <% if (aoo.isEnabled(ActObjsOptsConst.PROJECT_CURL)) { %>
                  <trans:showPageMessage label="p.url" />:
                  <% if (cinfo.getcURL() == null) { %>
                        <%=unspecified%>
                  <% } else { %>
                        <a href="<%=cinfo.getcURL()%>"><%=cinfo.getcURL()%></a>
                  <% } %>
                  <% } %>
            </TD>
      </TR>
      <% } // contact item%>
      <% } // contacts %>

     <%// relevant documents %>
     <%
           AIDADocument[] docs = bean.getDocuments();
           if (docs == null) docs = new AIDADocument[0];
     %>
     <% if (docs.length > 0) { %>
     <TR bgColor=#ffffff>
          <TD width="20%" class=text_searchbold valign="top">
               <trans:showPageMessage label="p6.docs" />
          </TD>
          <TD width="80%" class=text_search valign="top">
               <%=(docs.length > 0) ? "" : unspecified%>
               <% for (int i = 0; i < docs.length; i++) { %>
                    &middot;&nbsp;<%=docs[i].getTitle(lang_bean.language)%> (<%=docs[i].getName()%>)
                    (<a href="<%=ctx%><%=docs[i].getRelativeLink()%>"><trans:showPageMessage label="p.test" /></a>)
                    <p>
                    <%=docs[i].getDesc(lang_bean.language)%>
                    </p>
               <% } %>
          </TD>
     </TR>
     <% } %>

     <%// relevant links %>
     <%
           AidaResource[] resources = bean.getResources();
           if (resources == null) resources = new AidaResource[0];
     %>
     <% if (resources.length > 0) { %>
     <TR bgColor=#ffffff>
          <TD width="20%" class=text_searchbold valign="center">
               <b><trans:showPageMessage label="p6.res" /></b>
          </TD>
          <TD width="80%" class=text_search valign="top">
               <%=(resources.length > 0) ? "" : unspecified%>
               <% for (int i = 0; i < resources.length; i++) { %>
                    &middot;&nbsp;<a href="<%=resources[i].getLink()%>"><%=resources[i].getTitle(lang_bean.language)%></a>
                    <p><%=resources[i].getDesc(lang_bean.language)%></p>
               <% } %>
          </TD>
     </TR>
     <% } %>

      <% if (bean.getInfoSource() != null) { %>
            <TR bgColor=#ffffff>
                  <TD width="20%" class=text_searchbold valign="center">
                        <img src=<%=ctx%>/images/arrow_blue.gif hspace=4>
                        <b><trans:showPageMessage label="p6.infosource" /></b>
                  </TD>
                  <TD width="80%" class=text_search valign="top">
			   <%=bean.getInfoSource()%>
                  </TD>
            </TR>
      <% } %>

      <% if (aoo.isEnabled(ActObjsOptsConst.NOTEFIELDS)) { %>
		<% if (bean.getNoteField1(lang_bean.language) != null) { %>
            <TR bgColor=#ffffff>
                  <TD width="20%" class=text_searchbold valign="center">
                        <img src=<%=ctx%>/images/arrow_blue.gif hspace=4>
                        <b><trans:showPageMessage label="p.notefields" /></b><br/>
				    <trans:showPageMessage label="p7.notefield1" />
                  </TD>
                  <TD width="80%" class=text_search valign="top">
			   <%=bean.getNoteField1(lang_bean.language)%>
                  </TD>
            </TR>
		<% } %>
		<% if (bean.getNoteField2(lang_bean.language) != null) { %>
            <TR bgColor=#ffffff>
                  <TD width="20%" class=text_searchbold valign="center">
                        <img src=<%=ctx%>/images/arrow_blue.gif hspace=4>
                        <b><trans:showPageMessage label="p.notefields" /></b><br/>
				    <trans:showPageMessage label="p7.notefield2" />
                  </TD>
                  <TD width="80%" class=text_search valign="top">
			   <%=bean.getNoteField2(lang_bean.language)%>
                  </TD>
            </TR>
		<% } %>
		<% if (bean.getNoteField3(lang_bean.language) != null) { %>
            <TR bgColor=#ffffff>
                  <TD width="20%" class=text_searchbold valign="center">
                        <img src=<%=ctx%>/images/arrow_blue.gif hspace=4>
                        <b><trans:showPageMessage label="p.notefields" /></b><br/>
				    <trans:showPageMessage label="p7.notefield3" />
                  </TD>
                  <TD width="80%" class=text_search valign="top">
			   <%=bean.getNoteField3(lang_bean.language)%>
                  </TD>
            </TR>
		<% } %>
		<% if (bean.getNoteField4(lang_bean.language) != null) { %>
            <TR bgColor=#ffffff>
                  <TD width="20%" class=text_searchbold valign="center">
                        <img src=<%=ctx%>/images/arrow_blue.gif hspace=4>
                        <b><trans:showPageMessage label="p.notefields" /></b><br/>
				    <trans:showPageMessage label="p7.notefield4" />
                  </TD>
                  <TD width="80%" class=text_search valign="top">
			   <%=bean.getNoteField4(lang_bean.language)%>
                  </TD>
            </TR>
		<% } %>
	 <% } %>
</table>
<br>
